home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
COMM
/
PCCP038.ARJ
/
MANUAL
< prev
next >
Wrap
Text File
|
1992-07-05
|
7KB
|
187 lines
Pete Cann's Communication Package
Portions Copyright (C) 1992 Peter Edward Cann
(Please see the file README for legal junk)
This is a set of programs and data files for communication between a
PC and something external, possibly over a modem. It is drastically
different from most other communications programs, in that it is
highly modular and generally requires the user to write batch files
and/or scripts to make use of it. This is what you might call a
"hacker style" paradigm (not to be confused with "cracker", generally
an infantile individual who feels so insignificant that they screw
other people in a desperate attempt to feel powerful). Hackers are
people who are very comfortable with computers, and like to have a
lot of control and to know what's going on. The source code for all
of these programs is included in the distribution, so if you know C
you have all the information I do now.
All of the programs give USAGE: information if invoked without
arguments. All of the programs that use a port can use COM 1 through
8, but COM 5 and 6 are only for AT and later machines and have not
been tested.
The centerpiece of the package is TERM. This is a terminal emulator.
It takes an emulation file, which you create or modify with EMUED.
EMUED lets you specify strings to send for any programmable key, and
lets you enter strings of characters and substitution tokens to
invoke functions. These would be the "escape sequences", although
they need not begin with Escape. The token codes are in EMU.H. The
emulation facility also provides a graphics character substitution
table for graphics character commands. TERM and EMUED look in the
directory named by the PCCPPATH environment variable for emulation
files, if PCCPPATH is set. The program CCODES types a hex listing of
display character codes for use when assigning graphics characters in
EMUED.
TERM generates a CRLF in response to a Linefeed character, so it is
often desirable to program an emulation to do a DOWN in response to a
Linefeed. For LF insertion, the function CRLF can be performed in
response to a CR. If the emulation file basename is prefixed with a
plus sign (+), local echo is activated.
The program MASTERM invokes term with the three or four arguments,
but if you exit TERM you get a menu for file transfers or beginning a
dribble file. The file transfer programs are three variations on
XMODEM in each direction, and have fairly clear names.
The program SESSION is a simple host program, for use AFTER password
validation by the script facility. It is hard-coded for 8n1 bits. It
expects the modem to be in AT&C1 mode, that is, Carrier Detect
conveys information. The last (optional) argument to SESSION is a
directory. If it is given, it is prepended to the entered pathname in
file transfer operations. If a directory is given, dot-dot (..) is
prohibited in pathnames and the Shell option is not available.
The environment of any subschell contains REMOTE=YES, so you can do
IF NOT "%REMOTE%"=="YES" THING
in a batch file, where THING is something that would be bad to do
from a comport, such as run a display editor. SESSION terminates if
Carrier Detect goes false.
The program MESSIN accepts a message from the port and appends it to
the specified file. This is for email to the sysop. The program
MESSOUT asks for a filename in the specified directory and displays
it with pagination. Security is achieved through sparse naming.
The program COMSCRPT runs scripts. It is very powerful, with multiple
branching look-fors, timeouts and retry limits.
The script file must have the extension ".SCR". If the PCCPPATH
environment variable is set, the program looks for the script there.
The program loads the script into RAM and then executes it. Lines are
limited to 80 characters. The number of lines is limited to 512.
The characters '|' and '~' are special. '|' means CR in < lines and >
lines (LF is stripped for > processing); and newline in ! lines. '~'
means 0.4 second delay in < lines and bell in ! lines. (In > lines it
means itself.) Also, in < and > lines, `xx (backquote followed by two
hex digits) expands to the specified character code. Letters in the
hex number may be either case. There is no validity checking. Also in
< lines, ^ means break. To send a magic character, use its hex code
with a backquote.
The first line of the script file is the first three arguments as for
TERM, space-delimited. In subsequent lines, the first character of
each line is the command; the rest of the line (after the delimiting
space) is argument(s). A final string argument may include spaces,
and begins after the delimiting space. Blank lines are ignored.
The command characters are as follows:
;
{introduces comment; line ignored; space not required}
: <decimal number 0-255>
{label for conditional or unconditional goto}
g <label #>
{goto label #}
* <label #>
{establishes a demon to goto label upon Control-X from keyboard}
{* -1 cancels}
r <label #> <retries> <handle>
{resets retry count and goes to label if hit more than retries}
{handle is 0 - 255 and supersedes previous use of same handle}
0 <retry handle>
{resets a retry counter having the specified handle}
p <seconds>
{processes pending look-fors; falls through upon timeout}
{clears pending look-for list upon completion}
{zero seconds indicates no timeout}
> <label #> <string>
{look for string upon p command; if hit goto label}
{incoming linefeeds ignored}
? <label #>
{goto label if Clear To Send or Tx Hold Reg Empty is false}
d <label #>
{goto label if Carrier Detect is true}
< <string>
{send string to port}
! <string>
{send string to console}
x <label #> <command line string>
{run executable file with arguments and wait for termination}
{goto label # if non-zero exit code}
s <label #> <command line string>
{run system command line and wait for termination}
{goto label # if error in running command.com}
{will not report errors within command string}
+
{Raise DTR handshake line}
-
{Drop DTR handshake line}
k <label> <character>
{set branch to label upon keyboard character received in w function}
{limit 64 simultaneous characters pending}
w <seconds>
{wait seconds for keyboard character, performing k dispatching}
{fall through if no character in <seconds> seconds}
{zero seconds indicates no timeout}
{clears all k commands pending upon any termination}
c
{clears pending lookfors and keys (> and k)}
q <exit code>
{quit with exit code}
{codes other than zero under 128 are reserved to internals}
When scripting modem commands, which is how you're intended to
configure and dial the modem, try a ~ before and after the at, for
instance:
< ~at~&f&c1&d2|
The program SCRCHK types a listing of the argument script file giving
statement numbers, which are not the same as line numbers. It leaves
out blank lines for some reason. It also detects some errors.
During execution of a script, Control-C will cancel and Control-X can
redirect the script.
All of the I/O programs except TERM pay attention to CTS. None of
them do XON/XOFF. The computer is assumed to be fast enough to keep
up. However, since DOS video is very slow, TERM will suspend display
if a buffer overrun threatens.